﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="SampleUpdateContentTemplates.aspx.cs" Inherits="OpenWaves.ActivityFeed.Web.Tests.Samples.SampleUpdateContentTemplates" %>

<%@ Register TagPrefix="af" Namespace="OpenWaves.ActivityFeed.Web.Controls" Assembly="OpenWaves.ActivityFeed.Web" %>
<%@ Register TagPrefix="c" TagName="SampleDescription" Src="~/Samples/SampleDescription.ascx" %>

<asp:Content ContentPlaceHolderID="head" runat="server">
    
    <style type="text/css">
        .contentA
        {
            background-color: #F55;
        }
        
        .contentB
        {
            background-color: #5F5;
        }
        
        .contentC
        {
            background-color: #55F;
        }
        
        div.contentA, div.contentB, div.contentC
        {
            display: inline-block;
            width: 200px;
            height: 40px;
        }

        .actionButtons {
            padding-bottom: 20px;
        }
    </style>

</asp:Content>

<asp:Content ContentPlaceHolderID="cphBody" runat="server">
    
<c:SampleDescription runat="server">
    <MessageTemplate>
        <p>This example shows how to use custom update content templates.</p>
    </MessageTemplate>
</c:SampleDescription> 

<h3>Custom 'Update content templates' class</h3>
    
<div class="actionButtons">
    <asp:Button runat="server" Text="Add A" OnClick="AddContent" CommandArgument="contentA" />
    <asp:Button runat="server" Text="Add B" OnClick="AddContent" CommandArgument="contentB" />
    <asp:Button runat="server" Text="Add C" OnClick="AddContent" CommandArgument="contentC" />
    <asp:Button runat="server" Text="Add unknown content" OnClick="AddContent" CommandArgument="unknown" />
</div>    

<af:ActivityFeed runat="server" FeedType="Global">
    <UpdateContentTemplates>
        <af:UpdateContentTemplate runat="server" ContentType="contentA">
            <div class="contentA">contentTypeA</div>
        </af:UpdateContentTemplate>
        <af:UpdateContentTemplate ID="UpdateContentTemplate1" runat="server" ContentType="contentB">
            <div class="contentB">contentTypeB</div>
        </af:UpdateContentTemplate>
        <af:UpdateContentTemplate ID="UpdateContentTemplate2" runat="server" ContentType="contentC">
            <div class="contentC">contentTypeC</div>
        </af:UpdateContentTemplate>
    </UpdateContentTemplates>
</af:ActivityFeed>

</asp:Content>

